<style>
    .detail-box {
        margin-top: 15px;
    }
    .detail-title {
        font-weight: bold;
        padding: 10px;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
    }
    .detail-item {
        margin-bottom: 20px;
    }
    .detail-item-title {
        font-weight: bold;
        margin-bottom: 10px;
    }
    .detail-item-content {
        padding: 10px;
        background-color: #f8f8f8;
        border-radius: 5px;
    }
    .ns-table-title {
        display: flex;
        align-items: center;
    }
    .img-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        margin-right: 10px;
    }
    .ns-title-content {
        display: flex;
        flex-direction: column;
    }
    .status-tag {
        display: inline-block;
        padding: 5px 10px;
        color: #fff;
        border-radius: 3px;
        font-size: 12px;
    }
    .status-fail {
        background-color: #F56C6C;
    }
    .status-waiting {
        background-color: #E6A23C;
    }
    .status-success {
        background-color: #67C23A;
    }
    .form-content {
        padding: 15px;
    }
</style>

<div class="ns-card-brief ns-tips">
    <div class="ns-form-content">
        <h2 class="ns-title">链动奖励记录详情</h2>
    </div>
</div>

<div class="layui-form">
    <div class="layui-card ns-card-common">
        <div class="layui-card-header ns-card-header">
            <span>基本信息</span>
            <a href="{:addon_url('lian://shop/reward/lists')}" class="layui-btn layui-btn-primary" style="float: right;">返回</a>
        </div>

        <div class="layui-card-body">
            <div class="layui-form-item">
                <label class="layui-form-label">ID：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.id}</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">会员信息：</label>
                <div class="layui-input-block">
                    <div class="ns-table-title">
                        {if !empty($info.member.member_avatar)}
                        <img src="{:img($info.member.member_avatar)}" class="img-avatar" title="{$info.member.member_name}" alt="{$info.member.member_name}" />
                        {/if}
                        <div class="ns-title-content">
                            <p>{$info.member.member_name}</p>
                            <p>{$info.member.mobile|default=''}</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">链动等级：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.lian_level.level_name|default='未设置'}</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">下单会员：</label>
                <div class="layui-input-block">
                    <div class="ns-table-title">
                        {if !empty($info.buy_member.member_avatar)}
                        <img src="{:img($info.buy_member.member_avatar)}" class="img-avatar" title="{$info.buy_member.member_name}" alt="{$info.buy_member.member_name}" />
                        {/if}
                        <div class="ns-title-content">
                            <p>{$info.buy_member.member_name|default=''}</p>
                            <p>{$info.buy_member.mobile|default=''}</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">订单信息：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">
                        <p>订单号：{$info.lian_order.order_sn|default=''}</p>
                        <p>订单金额：￥{$info.lian_order.order_amount|default='0.00'}</p>
                        <p>订单时间：{$info.lian_order.order_time ? date('Y-m-d H:i:s', $info.lian_order.order_time) : ''}</p>
                    </div>
                </div>
            </div>
            
            {if !empty($info.lian_order_goods)}
            <div class="layui-form-item">
                <label class="layui-form-label">订单商品：</label>
                <div class="layui-input-block">
                    <div class="ns-table-title">
                        {if !empty($info.lian_order_goods.goods_image)}
                        <img src="{:img($info.lian_order_goods.goods_image)}" class="img-avatar" title="{$info.lian_order_goods.goods_name}" alt="{$info.lian_order_goods.goods_name}" />
                        {/if}
                        <div class="ns-title-content">
                            <p>{$info.lian_order_goods.goods_name|default=''}</p>
                            <p>价格：￥{$info.lian_order_goods.goods_price|default='0.00'} × {$info.lian_order_goods.goods_num|default=0}</p>
                        </div>
                    </div>
                </div>
            </div>
            {/if}
            
            <div class="layui-form-item">
                <label class="layui-form-label">奖励类型：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$reward_type_name}</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">结算周期：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.settle_cycle} 天</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">奖励计算金额：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">￥{$info.settle_amount}</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">奖励比例：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.give_rate}%</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">奖励金额：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">￥{$info.give_amount}</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">冻结比例：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.frozen_rate}%</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">冻结金额：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">￥{$info.frozen_amount}</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">解冻状态：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">
                        {if $info.thaw_status == -1}
                        <span class="status-tag status-fail">失效</span>
                        {elseif $info.thaw_status == 0}
                        <span class="status-tag status-waiting">待解冻</span>
                        {elseif $info.thaw_status == 1}
                        <span class="status-tag status-success">已解冻</span>
                        {/if}
                    </div>
                </div>
            </div>
            
            {if $info.thaw_status == 1}
            <div class="layui-form-item">
                <label class="layui-form-label">解冻时间：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.unfrozen_time ? date('Y-m-d H:i:s', $info.unfrozen_time) : ''}</div>
                </div>
            </div>
            {/if}
            
            <div class="layui-form-item">
                <label class="layui-form-label">创建时间：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.create_time ? date('Y-m-d H:i:s', $info.create_time) : ''}</div>
                </div>
            </div>
            
            {if $info.settle_time > 0}
            <div class="layui-form-item">
                <label class="layui-form-label">结算时间：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.settle_time ? date('Y-m-d H:i:s', $info.settle_time) : ''}</div>
                </div>
            </div>
            {/if}
            
            <div class="layui-form-item">
                <label class="layui-form-label">更新时间：</label>
                <div class="layui-input-block">
                    <div class="ns-input-text">{$info.update_time ? date('Y-m-d H:i:s', $info.update_time) : ''}</div>
                </div>
            </div>
        </div>
    </div>
</div> 